from django.template import loader, Context
from django.http import HttpResponse
from bstronger.app.models import Exercise

""" trying to make index page for the root address
def index(request):
    t = loader.get_template('index.html')
    c = Context();
    return HttpResponse(t.render(c))
"""

def exercise(request):
    exercises = Exercise.objects.all()
    t = loader.get_template('exercises.html')
    c = Context({'exercises': exercises})
    return HttpResponse(t.render(c))